package web.api.global.message;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import web.common.core.validation.annotation.FieldEqual;
import web.common.core.validation.annotation.Mobile;

import javax.validation.constraints.NotEmpty;

/**
 * @author Jin Zheng
 * @since 1.0 2022-01-25
 */
@Getter
@Setter
@NoArgsConstructor
@FieldEqual(fields = {"password", "password2"}, message = "2次密码不一致")
public class RegisterApiRequest {
	@NotEmpty(message = "用户手机号码不能为空")
	@Mobile(message = "用户手机号码格式错误")
	private String mobile;

	@NotEmpty(message = "用户名称不能为空")
	private String name;

	@NotEmpty(message = "用户密码不能为空")
	private String password;

	@NotEmpty(message = "用户密码2不能为空")
	private String password2;

}
